import { ComsTypeEnum } from '@/types'
// 业务组件
import SingleSelect from '@/components/Survey/Materials/SelectComs/SingleSelect.vue'
import SinglePicSelect from '@/components/Survey/Materials/SelectComs/SinglePicSelect.vue'
import OptionSelect from '@/components/Survey/Materials/SelectComs/OptionSelect.vue'
import MuSelect from '@/components/Survey/Materials/SelectComs/MuSelect.vue'
import MuPicSelect from '@/components/Survey/Materials/SelectComs/MuPicSelect.vue'
import TextNode from '@/components/Survey/Materials/NoteComs/TextNode.vue'
// 编辑组件
import TitleEditor from '@/components/Survey/EditItems/TitleEditor.vue'
import DescEditor from '@/components/Survey/EditItems/DescEditor.vue'
import PositionEditor from '@/components/Survey/EditItems/PositionEditor.vue'
import SizeEditor from '@/components/Survey/EditItems/SizeEditor.vue'
import WeightEditor from '@/components/Survey/EditItems/WeightEditor.vue'
import ItalicEditor from '@/components/Survey/EditItems/IditorEditor.vue'
import ColorEditor from '@/components/Survey/EditItems/ColorEditor.vue'
import PicOptionEditor from '@/components/Survey/EditItems/PicOptionEditor.vue'
import TextTypeEditor from '@/components/Survey/EditItems/TextTypeEditor.vue'

// 形成组件名和具体组件的映射
export const ComponentMap = {
  //业务组件
  // 单选
  [ComsTypeEnum.singleSelect]: markRaw(SingleSelect),
  // 多选
  [ComsTypeEnum.muSelect]: markRaw(MuSelect),
  // 下拉选择
  [ComsTypeEnum.optionSelect]: markRaw(OptionSelect),
  // 图片单选
  [ComsTypeEnum.singlePicSelect]: markRaw(SinglePicSelect),
  // 图片多选
  [ComsTypeEnum.muPicSelect]: markRaw(MuPicSelect),
  // 备注说明
  [ComsTypeEnum.textNode]: markRaw(TextNode),
  // 单选:性别 学历
  [ComsTypeEnum.personInfoGender]: markRaw(SingleSelect),
  [ComsTypeEnum.personInfoEdu]: markRaw(SingleSelect),

  // 编辑组件
  [ComsTypeEnum.titleEditor]: markRaw(TitleEditor),
  [ComsTypeEnum.descEditor]: markRaw(DescEditor),
  [ComsTypeEnum.sizeEditor]: markRaw(SizeEditor),
  [ComsTypeEnum.weightEditor]: markRaw(WeightEditor),
  [ComsTypeEnum.positionEditor]: markRaw(PositionEditor),
  [ComsTypeEnum.colorEditor]: markRaw(ColorEditor),
  [ComsTypeEnum.italicEditor]: markRaw(ItalicEditor),
  [ComsTypeEnum.textTypeEditor]: markRaw(TextTypeEditor),
  [ComsTypeEnum.picOptionEditor]: markRaw(PicOptionEditor),
}
